package com.mbyte.easy.admin.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mbyte.easy.admin.entity.Check;
import com.mbyte.easy.admin.entity.Draft;
import com.mbyte.easy.admin.entity.Group;
import com.mbyte.easy.admin.entity.Ppt;
import com.mbyte.easy.security.entity.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


/**
 * <p>
 * ppt表 服务类
 * </p>
 *
 * @author lp
 * @since 2019-12-12
 */
public interface IPptService extends IService<Ppt> {

    IPage<Ppt> listPage(@Param("page")IPage<Ppt> page, QueryWrapper<Ppt> queryWrapper);



    SysUser getUserByUserName(String username);


    /**
     * @Author 张雪
     * @Description 查询用户信息
     * @Date 2019/12/10 9:52
     * @Param
     * @return
     **/
    List<SysUser> allotBefore(String username);
    /**
     * @Author 张雪
     * @Description 查询当前登录用户的所有下属用户
     * @Date 2019/12/10 9:53
     * @Param
     * @return
     **/
    List<SysUser> selectAllWorker(String username);

    List<Group> getGroupByUserId(Long userId);

   List<Long> getAllotDraftIdByUserId(Long userId);

    Group getGroupIdById(Long id);

    int insertCheck(Check check);

    List<Check> getCheckById(Long id);
    List<Check> getChecksById(Long id);
    List<Check> getChecksByIdUnPass(Long id);

    Long selectIdByUsername(String currentUsername);

    Draft GetGroupIdById(Long id);

    IPage leaderCheckIndex(Ppt ppt, Integer pageNo, Integer pageSize);

    Map setGroupStatus();

    Map setDraftCheckStatus();

    List<Long> getChildrenIdByParentId(Long id);

    Ppt selectGroupIdById(Long id);

    List<Check> getChecksByIdPass(Long id);

    Long selectDIdByID(Long arrayId);

    Ppt getBydraftId(Long id);


    boolean updateStatusByDraftId(Ppt ppt);
}
